package com.qf.shopping.service.impl;

import com.qf.shopping.dao.BaseDao;
import com.qf.shopping.dao.IProductTypeDao;
import com.qf.shopping.dao.impl.ProductTypeDaoImpl;
import com.qf.shopping.entity.ProductType;
import com.qf.shopping.service.IProductTypeService;

import java.util.List;

/**
 * @author 三旬
 * @version 1.0  2022/9/15
 */

public class ProductTypeServiceImpl extends BaseServiceImpl<ProductType> implements IProductTypeService {
    IProductTypeDao productTypeDao = new ProductTypeDaoImpl();

    @Override
    protected BaseDao<ProductType> getBaseDao() {
        return productTypeDao;
    }

    @Override
    public boolean delChecked(List<Integer> list) {
        return productTypeDao.delChecked(list) > 0;
    }

    @Override
    public List<ProductType> getProdctTypeListByPid(Integer pid) {
        return productTypeDao.getProdctTypeListByPid(pid);
    }

    @Override
    public List<ProductType> getParentChildren(Integer id) {
        return productTypeDao.getParentChildren(id);
    }
}
